310d1ffd0202c5d97f810f80e71011fa678cbff1,codeInsight/impl/com/intellij/codeInsight/daemon/impl/quickfix/StaticImportMethodFix.java,StaticImportMethodFix,isAvailable,#Project#Editor#PsiFile#,55
Before Change
public boolean isAvailable(Project project, Editor editor, PsiFile file) {
if (LanguageLevel.JDK_1_5.compareTo(PsiUtil.getLanguageLevel(file)) > 0) return false;
if (myMethodCall == null || !myMethodCall.isValid()) return false;
if (!file.getManager().isInProject(file)) return false;
PsiManager manager = file.getManager();
if (myMethodCall.getMethodExpression().isQualified()) {
// TODO[cdr]: review
return false;
}
candidates = getMethodsToImport(manager);
return !candidates.isEmpty();
}
@NotNull
After Change
}
public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) {
return LanguageLevel.JDK_1_5.compareTo(PsiUtil.getLanguageLevel(file)) <= 0
&& myMethodCall != null
&& myMethodCall.isValid()
&& file.getManager().isInProject(file)
&& !candidates.isEmpty()
;
}